﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UnliQ.Data
{
    public interface IData<T, I> where T : class
    {
        /// <summary>
        /// Gets a specific item.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T Get(I id);

        /// <summary>
        /// Gets the item list of the specified type
        /// </summary>
        /// <returns></returns>
        List<T> GetList();

        /// <summary>
        /// Inserts data component type
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        I Insert(T value);

        /// <summary>
        /// updates data component type
        /// </summary>
        /// <param name="value"></param>
        void Update(T value);

        /// <summary>
        /// deletes data component type by id
        /// </summary>
        /// <param name="id"></param>
        void Delete(I id);
    }
}
